##master-page:DockStarTemplate

||<tablestyle="float: right; margin: 0px;"style="padding: 0.5em; border: 0px none; font-size: 100%;"><<TableOfContents>> ||


== Arduino Pro Mini ==
I needed an 2 channel '''Analog/Digital converter''' with 10 bit resolution and I2C bus, with minimal cost and effort. To my surprise it looks like, that an Arduino Pro Mini module from China just made it for 2.50 EUR, including shipping, see [[http://ebay.com| ref. number 121192432250, seller  gc_supermarket ]].
 * Dimensions: 18 x 33 mm
 * [[http://arduino.cc/en/Main/ArduinoBoardProMini|Arduino Pro Mini description]]

The version from China has a layout change, which is of benefit, because you have now an ISP (In System Programming) connector, see the '''pictures'''.

||[[attachment:Arduino_ProMini_upper_DSC05048.jpg|{{attachment:Arduino_ProMini_upper_DSC05048.jpg||width="320"}}]]
||[[attachment:Arduino_ProMini_lower_DSC05049.jpg|{{attachment:Arduino_ProMini_lower_DSC05049.jpg||width="320"}}]]
||[[attachment:Arduino_ProMini_AVRISP_DSC05045.jpg|{{attachment:Arduino_ProMini_AVRISP_DSC05045.jpg||width="320"}}]]||

=== Software, Arduino ===
The program was developed with '''Arduino IDE''' Version 1.0.5, with the '''wire library'''.

Usually an Arduino module will come with the '''boot loader''' preinstalled. In this case it was not the right boot loader. The '''green LED''' switches ON, when you power up the module, but the connection to the PC with an '''USB/Serial converter''' will fail. So, I had to solder the 6 pins for the ISP programming and flashed the proper boot loader (Arduino Mini or Pro Mini (5V, 16 MHz)w/ ATmega328) with an ISP programmer. Even when the module is powered with 3.3V only, the 16 MHz clock works stable.

Next step is to connect a USB/Serial converter with the pins:
{{{
   Arduino     USB/Serial
signal color   signal note
GND    brown   GND
RXD    red     RXD    to Arduino
TXD    orange  TXD    from Arduino
+5V    yellow  +5V
DTR    green   DTR    for Reset pulse
}}}
The trick with the programming via USB is, that via DTR pulse a Reset signal will start the boot loader. If within a few seconds the programmer (avrdude) responds, the flash ROM programming will start.

For an easier start read [[http://arduino.cc/en/Guide/HomePage|Getting started]]. 

The analog value will be averaged with 8 samples, in order to reduce the noise.

For help with the '''C''' programming look at the [[http://arduino.cc/en/Reference/HomePage|Language Reference]].

If you want to get the '''hex''' file of the compiled program, select in Arduino/Preferences verbose output at compile time. Then you can see in the output window the file path of the '''hex file''', and copy it to an other place. Because this path will be deleted, when you quit the Arduino IDE.

A very cheap ISP programmer can be bought [[http://www.ehajo.de/Bausaetze/AVR-ISP-Stick?source=2&refertype=1&referid=5|AVR-USB-Stick]] for  10 EUR inclusive shipping (kit). The tutorial is [[http://dokuwiki.ehajo.de/bausaetze:avr-isp-stick-aufbau|here]]. More details can be found at [[http://www.mikrocontroller.net/articles/AVR-ISP-Stick|Mikrocontroller]]. The orinigal development was done at [[http://www.ladyada.net/make/usbtinyisp/download.html|LadyAda (Software)]].

=== A/D Converter Hardware ===
For the schematic have a look at [[RaspberryPiWobbulator#A.2FD_converter.2C_hardware_Nano3]].

=== Links ===
 * [[http://www.ladyada.net/learn/avr/avrdude.html|avrdude tutorial for Windows]]
 * [[http://savannah.nongnu.org/projects/avrdude|avrdude home, download]]
 * [[attachment:ADCNano3.ino|A/D converter program source code]]


=== List of pages in this category: ===

<<FullSearch(category:CategoryAVR)>>

-- RudolfReuter <<DateTime(2013-12-19T12:47:23Z)>>


Gehe zurück zu [[ ]] oder StartSeite ; KontaktEmail (ContactEmail)
